﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OdsServer.Common;
using StructureMap;

namespace OdsServer.Tests
{
    public class DebugConfiguration : IServerConfiguration
    {
        public int BaseChannelNumber
        {
            get
            {
                return 1;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public int ChannelCount
        {
            get
            {
                return 4;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public OdsServer.Common.Enum.ChannelDataType DefaultDataType
        {
            get
            {
                return OdsServer.Common.Enum.ChannelDataType.Binary;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public SetupParameters GetSetupParameters()
        {
            return new SetupParameters();
        }

        public OdsServerMarshalConfiguration MarshalTransfer
        {
            get { throw new NotImplementedException(); }
        }

        public OdsServerPipeConfiguration PipeTransfer
        {
            get { throw new NotImplementedException(); }
        }

        public OdsServerSocketConfiguration SocketTransfer
        {
            get 
            {
                OdsServerSocketConfiguration conf = ObjectFactory.GetInstance<OdsServerSocketConfiguration>();
                conf.Port = 10666;
                conf.Active = true;

                return conf;
            }
        }

        public int TimeInterval
        {
            get
            {
                return 100;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool UseMarshalTransfer
        {
            get
            {
                return false;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool UsePipeTransfer
        {
            get
            {
                return false;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool UseSocketTransfer
        {
            get
            {
                return true;
            }
            set
            {
                throw new NotImplementedException();
            }
        }
    }
}